import request from '@/utils/request'

// 查询财务核心-结转记录列表
export function listFinCarryoverRecord(query) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/list',
    method: 'get',
    params: query
  })
}

// 查询财务核心-结转记录列表
export function listFinCarryoverRecordAsc(query) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/listFinCarryoverRecordAsc',
    method: 'get',
    params: query
  })
}

// 期末结转-结转
export function carryoverHandel(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/carryoverHandel',
    method: 'post',
    data: data
  })
}
// 期末结转-获取反结账查询的已经结账记录的列表
export function getCarryYearMonthList(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/getCarryYearMonthList',
    method: 'post',
    data: data
  })
}

// 期末结转-开始反结账
export function startBackCarryover(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/startBackCarryover',
    method: 'post',
    data: data
  })
}

// 期末结转-生成凭证
export function generateVoucher(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/generateVoucher',
    method: 'post',
    data: data
  })
}

// 年末结转-生成凭证
export function generateVoucherYear(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/generateVoucherYear',
    method: 'post',
    data: data
  })
}

// 查询财务核心-结转记录详细
export function getFinCarryoverRecord(id) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/' + id,
    method: 'get'
  })
}

// 保存财务核心-结转记录
export function saveFinCarryoverRecord(data) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/save',
    method: 'post',
    data: data
  })
}

// 删除财务核心-结转记录
export function delFinCarryoverRecord(id) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/' + id,
    method: 'delete'
  })
}

// 导出财务核心-结转记录
export function exportFinCarryoverRecord(query) {
  return request({
    url: '/carryoverRecord/finCarryoverRecord/export',
    method: 'get',
    params: query
  })
}
